package com.example.persistence;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import java.util.List;

@ConditionalOnProperty(name = "mqtt.persistence.mysql.enabled", havingValue = "true")
public interface MessageStore extends JpaRepository<MqttMessage, Long> {
    List<MqttMessage> findByTopicAndRetainedTrue(String topic);
    List<MqttMessage> findByClientIdAndQosGreaterThan(String clientId, int qos);
} 